package com.ns.sbs.oauth.acc4log.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ns.sbs.oauth.acc4log.dto.Acc4LogPageDto;
import com.ns.sbs.oauth.acc4log.entry.Acc4Log;
import com.ns.sbs.oauth.acc4log.mapper.Acc4LogMapper;
import com.ns.sbs.oauth.acc4log.vo.AccLoginVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 登录业务接口实现
 *
 * @author : liaowei
 * @version : v1.0.0
 * @since : 2024/8/24 22:26
 **/
@Service
@RequiredArgsConstructor
public class Acc4LogServiceImpl extends ServiceImpl<Acc4LogMapper, Acc4Log> implements IAcc4LogService {

    private final Acc4LogMapper mapper;

    @Override
    public AccLoginVO getById(Long id) {
        return mapper.getById(id);
    }

    @Override
    public Page<AccLoginVO> getList(Acc4LogPageDto dto) {
        return mapper.getList(dto, new Page<>(dto.getCurrent(), dto.getSize()));
    }
}
